Repository navigation
Fix documentation errors in Android.Text and Android.Text.Format (R098, pass 3) - #1978
Conversation
…8, pass 3) Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
The pinned AOSP campaign archive is unavailable in the checkout, leaving the GetChars, span-equality, and relative-date-formatting claims pending human verification against that source.
No open issues 🎉
What changed in this PR
This documentation-only PR corrects 24 documentation entries across 18 files in Android.Text and Android.Text.Format, aligning the managed API reference with implementation behavior. It does not change runtime code or API signatures.
Changes:
- Clarifies JNI reference handling in seven activation constructors, consistent with the wording introduced in #1941.
- Corrects text equality, character copying, layout spacing, splitter behavior, and login-filter documentation.
- Documents relative-date abbreviation flags and the empty-string result when formatting a file size with a null context.
| File | Description |
|---|---|
docs/xml/Android.Text/WordSegmentFinder.xml |
Clarifies JNI reference handling. |
docs/xml/Android.Text/TextUtils+SimpleStringSplitter.xml |
Corrects iteration and unsupported-removal remarks. |
docs/xml/Android.Text/TextShaper.xml |
Clarifies JNI reference handling. |
docs/xml/Android.Text/SpannedString.xml |
Describes text-and-span equality. |
docs/xml/Android.Text/SpannableStringInternal.xml |
Clarifies JNI reference handling. |
docs/xml/Android.Text/SpannableString.xml |
Describes text-and-span equality. |
docs/xml/Android.Text/SegmentFinder+PrescribedSegmentFinder.xml |
Clarifies JNI reference handling. |
docs/xml/Android.Text/SegmentFinder.xml |
Clarifies JNI reference handling. |
docs/xml/Android.Text/LoginFilter+UsernameFilterGMail.xml |
Removes an incorrect override requirement. |
docs/xml/Android.Text/LoginFilter+UsernameFilterGeneric.xml |
Removes an incorrect override requirement. |
docs/xml/Android.Text/LoginFilter+PasswordFilterGMail.xml |
Removes an incorrect override requirement. |
docs/xml/Android.Text/IGetChars.xml |
Corrects the destination parameter reference. |
docs/xml/Android.Text/Highlights.xml |
Clarifies JNI reference handling. |
docs/xml/Android.Text/GraphemeClusterSegmentFinder.xml |
Clarifies JNI reference handling. |
docs/xml/Android.Text/BoringLayout.xml |
Corrects fallback and legacy spacing parameter descriptions. |
docs/xml/Android.Text/AlteredCharSequence.xml |
Explains copying behavior and corrects the offset reference. |
docs/xml/Android.Text.Format/Formatter.xml |
Documents the null-context return value. |
docs/xml/Android.Text.Format/DateUtils.xml |
Clarifies abbreviation flags and date-formatting limits. |
Review effort: Balanced
|
@dalexsoto review |
|
In response to @jonathanpeppers's request: I have checked all 18 changed documentation files and their relevant Android source contracts. The target branch moved again from 90c2b57 to 7b42354 while the final publication snapshot was being captured (the guard returned: "Head, actual target or description changed during publication capture"). I still need to check that last target-only integration delta and repeat the final whole-PR pass against it. This is a reviewer coverage gap, not a defect in this PR; the completed source review is retained for the next scheduled tick. |
dalexsoto
left a comment
There was a problem hiding this comment.
Reviewed all 18 changed XML documentation files and the affected reference and platform behavior, including the character-copy behavior, span equality, relative-date flags, fallback line spacing, and JNI reference-ownership wording. No blocking correctness issues found. Static source review only; no builds or tests executed.
Agent assessment
Self-reported assessment, not an independent review.
Assessed revision:
2053ec2e05e94525d1c5ff21fb10e5e0b5ea6180↑ All 18 changed XML files parse;
git diff --checkis clean; no new placeholders.↑ gemini-4-argon review reported no findings.
↓ Copilot and human reviews are pending.
Scope
Pass-3 review of AI-written documentation in
Android.TextandAndroid.Text.Format(item R098, 90 files). I reviewed 2401 AI-changed channels, one ledger row each: 2166 correct, 24 fixed, 211 deferred boilerplate. Only high-confidence errors are fixed.Fixes (24 channels, 18 files)
Make/ReplaceOrMakeuseFallbackLineSpacing(2)Makespacingmult/spacingadd(2)GetRelativeDateTimeStringflags(2)FORMAT_ABBREV_RELATIVE/FORMAT_ABBREV_ALLEqualsreturns (2)transfer(7)transferselects deletion of the incoming one (wording as in #1941)GetCharsremarks andoffparam (2)dstHasNextremarksnext()throws whenhasNext()is false; after a trailing delimiternext()returns ""RemoveremarksIteratortext; this method always throwsUnsupportedOperationExceptionIsAllowedremarks (3)FormatShortFileSizereturnsGetCharsdestoffparamdstPinned sources: AOSP android/text sources from the campaign source archive; dotnet/android@9bc18c75; dotnet/java-interop@87c5d3ea.
Uncertain findings and observations
AlteredCharSequence.SubSequencestring overload callstoString(), which callsgetChars(0, len). That can throw when the selected range does not touch the substituted range (AlteredCharSequence.java:103-106, 114, 118-124). This is implementation behavior, not a doc error.Checks
git diff --checkis clean.To be addedtext.index.xml,_filter.xmlorFrameworksIndex.